/* 
 * File:   exercise6.h
 * Author: Vic
 *
 * Created on April 29, 2013, 2:04 PM
 */

#ifndef EXERCISE6_H
#define	EXERCISE6_H
#include <cstdlib>
#include <iostream>
double getsales()
{
    double  sales=0;
    std::cout<<"Please enter the amount of sales";
    std::cin>>sales;
    return sales;
}
double getDollars(double in)
{
    if(in<1000)
        return .03*in;
    else if(in<3000)
        return .35*in;
    else
        return .45*in;
}

void exercise6(){
    double sales=getsales();
    double dollars=getDollars(sales);
    std::cout<<"the commision is "<<dollars<<std::endl;
}


#endif	/* EXERCISE6_H */

